package com.gzc.pm.ro;

import java.util.List;

import cn.skyclass.net.OperationResult;

import com.gzc.pm.bean.CPLRouteBean;
import com.gzc.pm.dao.CPLRouteDao;

public class CPLRouteRo {

	public List<CPLRouteBean> getByAxleIds(String axleIds){
		CPLRouteDao dao = new CPLRouteDao();
		List<CPLRouteBean> list = dao.getByAxleIds(axleIds);
		for(CPLRouteBean route : list){
			float d = route.getParamD();
			float l = route.getParamL();
			route.setParamDStr(String.valueOf(d));
			route.setParamLStr(String.valueOf(l));
		}
		return list;
	}
	
	public OperationResult insert(CPLRouteBean bean){
		CPLRouteDao dao = new CPLRouteDao();
		return dao.insert(bean);
	}
	
	public OperationResult update(CPLRouteBean bean){
		CPLRouteDao dao = new CPLRouteDao();
		return dao.update(bean);
	}
	
	public OperationResult deleteById(int id){
		CPLRouteDao dao = new CPLRouteDao();
		return dao.deleteById(id);
	}
	
}
